<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>homework3</title>
</head>
<body>
<pre>
str ='hello world! 123'
dic = {"english": 0, "num": 0}
for a in str:
    if a.isdigit():
        dic["num"] += 1
    elif a.isalpha():
        dic['english'] += 1
    else:
        pass
print("英文", dic["english"])
print("数字", dic["num"])
</pre>
</body>
</html>